import React, { useEffect } from 'react'
import { useLocation } from 'react-router-dom'

export default function NewsDetail () {
  const location = useLocation()

  useEffect(() => {
    // console.log(location)
    const searchParams = new URLSearchParams(location.search)

    const id = searchParams.get('id')
    const name = searchParams.get('name')

    console.log(id, name)
  }, [])

  return <div>NewsDetail</div>
}
